<?php

namespace App\Traits\GetModel;

use App\Models\Admin\User\AdminUserModel;
use App\Models\Admin\User\UserAuthorityModel;
use App\Models\Admin\User\UserUpdateOrderRecordsModel;
use App\Models\Applet\Sponsor\SponsorIntegralRecordsModel;
use App\Models\Applet\User\UserAddressModel;
use App\Models\Applet\User\UserIntegralRecordsModel;
use App\Models\Applet\User\UserModel;
use App\Models\Applet\User\UserSlaughterAddressModel;
use App\Models\Applet\User\UserSponsorImgModel;
use App\Models\Applet\User\UserSponsorModel;
use Exception;

trait GetUserModelTrait
{
    /**
     * @return AdminUserModel
     * @throws Exception
     */
    public function getAdminUserModel(): AdminUserModel
    {
        return loadModel('Admin\User\AdminUserModel');
    }

    /**
     * @return UserAuthorityModel
     * @throws Exception
     */
    public function getUserAuthorityModel(): UserAuthorityModel
    {
        return loadModel('Admin\User\UserAuthorityModel');
    }

    /**
     * @return UserModel
     * @throws Exception
     */
    public function getUserModel(): UserModel
    {
        return loadModel('Applet\User\UserModel');
    }

    /**
     * @return UserSponsorModel
     * @throws Exception
     */
    public function getUserSponsorModel(): UserSponsorModel
    {
        return loadModel('Applet\User\UserSponsorModel');
    }

    /**
     * @return UserSponsorImgModel
     * @throws Exception
     */
    public function getUserSponsorImgModel(): UserSponsorImgModel
    {
        return loadModel('Applet\User\UserSponsorImgModel');
    }

    /**
     * @return UserAddressModel
     * @throws Exception
     */
    public function getUserAddressModel(): UserAddressModel
    {
        return loadModel('Applet\User\UserAddressModel');
    }

    /**
     * @return UserIntegralRecordsModel
     * @throws Exception
     */
    public function getUserIntegralRecordsModel(): UserIntegralRecordsModel
    {
        return loadModel('Applet\User\UserIntegralRecordsModel');
    }

    /**
     * @return SponsorIntegralRecordsModel
     * @throws Exception
     */
    public function getSponsorIntegralRecordsModel(): SponsorIntegralRecordsModel
    {
        return loadModel('Applet\Sponsor\SponsorIntegralRecordsModel');
    }

    /**
     * @return void
     * @throws Exception
     */
    public function getUserUpdateOrderRecordsModel(): UserUpdateOrderRecordsModel
    {
        return loadModel('Admin\User\UserUpdateOrderRecordsModel');
    }

    /**
     * @return UserSlaughterAddressModel
     * @throws Exception
     */
    public function getUserSlaughterAddressModel(): UserSlaughterAddressModel
    {
        return loadModel('Applet\User\UserSlaughterAddressModel');
    }
}
